package com.asm.repository;

import com.asm.entity.sys.Contract;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface ContractRepository extends JpaRepository<Contract, Long> {
    Page<Contract> findByContractName(String contractName, Pageable page);

    Page<Contract> findByStatus(String status, Pageable page);

    @Query("select c from Contract c where c.isDel=false ")
    Page<Contract> findAll(PageRequest of);
}
